package com.kun.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

@Getter
@Setter
@ToString
@NoArgsConstructor
public class TUserInfo {

    /**
     * 唯一标识
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 头像
     */
    private String avatar;
    /**
     * 签名
     */
    private String signature;
    /**
     * 性别0男，1女，2未知
     */
    private String gender;
    /**
     * 生日
     */
    private LocalDate birthday;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 数据权限列表
     */
    @TableField(exist = false)
    private List<TRolePermission> permissions;

    @TableField(exist = false)
    private String uuid;

    public TUserInfo(Long userId, String nickname, String gender, LocalDate birthday, LocalDateTime createTime) {
        this.userId = userId;
        this.nickname = nickname;
        this.gender = gender;
        this.birthday = birthday;
        this.createTime = createTime;
    }
}
